[% setvar title Perl6 Summary for week ending 20020714 %]
<div id="archive-notice">
    <h3>This file is part of the Perl 6 Archive</h3>
    <p>To see what is currently happening visit <a href="http://www.perl6.org/">http://www.perl6.org/</a></p>
</div>
<div class='pod'>
<a name='Perl6 Summary for week ending 20020714'></a><h1>Perl6 Summary for week ending 20020714</h1>
<p>Well, what a week it's been, eh sportsfans? Without much more ado
here's a rundown of all the excitement in the Perl 6 development
camps.</p>
<a name='Still waiting for Exegesis 5?'></a><h2>Still waiting for Exegesis 5?</h2>
<p>The week before last saw a couple of fantastic postings on Perlmonks
dealing with the fun stuff in Apocalypse 5. I'm sorry I missed them
last week. Damian is still beavering away on the Exegesis but these
(shall I call them Apocrypha?) are well worth reading.</p>
<p><a href='http://www.perlmonks.org/index.pl?node_id=179555' target='_blank'>www.perlmonks.org</a></p>
<p><a href='http://www.perlmonks.org/index.pl?node_id=179755' target='_blank'>www.perlmonks.org</a></p>
<a name='Is Parrot a second system?'></a><h2>Is Parrot a second system?</h2>
<p>John Porter worried about the second system effect, and about whether
the movement to implement a bunch of 'foreign' VM ops on Parrot was
just going to add bloat and inefficiency. Dan assured him that &quot;These
'add-on' bytecode interpreters don't get any special consideration in
the core.&quot; John was reassured.</p>
<p>I think it was decided that Parrot <i>is</i> a second system, but that
we're working to avoid the classic problems associated with them.</p>
<p><a href='http://archive.develooper.com/perl6-internals@perl.org/msg10802.html' target='_blank'>archive.develooper.com</a></p>
<a name='Don't mix labels and comments'></a><h2>Don't mix labels and comments</h2>
<p>Simon Glover had a problem with</p>
<pre>    A:              # prints &quot;a&quot;
        print &quot;a&quot;
        end</pre>
<p>Which kills the assembler because of the presence of the comment. Tom
Hughes posted a patch to fix than, and Brian Wheeler pointed out that
the patch means you can't do <code>print &quot;#&quot;</code>, which would be bad. Tom
reckons he fixed that with his second patch.</p>
<p><a href='http://archive.develooper.com/perl6-internals@perl.org/msg10915.html' target='_blank'>archive.develooper.com</a>
Tom's initial fix.</p>
<p><a href='http://archive.develooper.com/perl6-internals@perl.org/msg10918.html' target='_blank'>archive.develooper.com</a>
And the second.</p>
<a name='Perl 6 grammar, take 5'></a><h2>Perl 6 grammar, take 5</h2>
<p>Sean O'Rourke is my hero. He's still beavering away on writing a Perl
6 grammar. The latest incarnation is apparently &quot;Turing-complete, if
you have a parrot engine and a bit of spare time.&quot; The grammar is
still incomplete (of course), and someone pointed out that it had a
problem with code like <code>{ some_function_returning_a_hash() }</code>. Should
it give a closure? Or a hash ref. Larry hasn't commented so far.</p>
<p>Sean comments: &quot;The fact that I've been able to whip this up in a
couple thousand lines of code is a remarkable testament to Parrot's
maturity, and to the wealth of tools available in Perl 5.  In
particular, without The Damian's Parse::RecDescent, Melvin Smith's
IMCC, and Sarathy's Data::Dumper, it never would have been possible.&quot;</p>
<p>Quote of the thread: &quot;What, this actually <i>runs</i>? Oh, my.&quot; -- Dan
Sugalski</p>
<p><a href='http://archive.develooper.com/perl6-internals@perl.org/msg10866.html' target='_blank'>archive.develooper.com</a></p>
<a name='So, what is IMCC then?'></a><h2>So, what is IMCC then?</h2>
<p>I asked, they answered. Apparently Reading TFM would have been a good
place to start, though Melvin Smith didn't put it <i>quite</i> so bluntly
when he told me. Essentially, the IMCC is the Parrot intermediate
language compiler. It's a bit like an assembler but sits at a slightly
higher level and worries about the painful things like &quot;register
allocation, low level optimisation, and machine code generation.&quot; and
everyone gets to share that wealth, Perl6, Ruby, Python, whatever,
they all need the same facilities that IMCC provides.</p>
<p>The idea is that, instead of worrying about registers, you just
provide a string of temporaries or named locals, so you can write:</p>
<pre>    $I1 = 1
    $I2 = 2
    $I3 = $I1 + $I2
    $I5 = $I3 + 5</pre>
<p>And IMCC will notice that it only needs to use 2 registers when it
turns that into:</p>
<pre>    set I0, 1
    set I1, 2
    add I0, I0, I1
    add I0, I0, 5</pre>
<p>Melvin finishes by saying &quot; If people don't get anything else, they
should get this. Implementing a compiler will be twice as easy if they
target the IR instead of raw Parrot.  At a minimum, they implement
their parser, generate an AST, and walk the tree, emitting
intermediate expressions and directives.&quot;</p>
<p>Leon Brocard, who I am constitutionally required to namecheck in
every perl 6 summary, tells me &quot;imcc is the coolest thing... Please
don't quote me verbatim.&quot; Tee hee.</p>
<p>The fine manual is at languages/imcc/README in the parrot source
tree.</p>
<a name='Vtables and multimethod dispatch'></a><h2>Vtables and multimethod dispatch</h2>
<p>This continued from last week. For some reason this ended up with a
discussion of Pythagoras' Theorem and Manhattan Distance (this was to
do with the idea of dispatch based on distance in type space...)</p>
<p>John Porter worried about the cost of generating full MM dispatch
tables, quoting some scary numbers. Dan reckoned that the numbers
weren't that scary, and that the problem was limited quite neatly.</p>
<p>Quote of the thread: &quot;I'm not sure I want an algorithm that drives on
the sidewalks, runs red lights, and chases pedestrians...&quot; -- Dan
Sugalski (again)</p>
<p><a href='http://archive.develooper.com/perl6-internals@perl.org/msg10814.html' target='_blank'>archive.develooper.com</a>
is a good 'root' to start at.</p>
<p><a href='http://archive.develooper.com/perl6-internals@perl.org/msg10859.html' target='_blank'>archive.develooper.com</a>
Quote of the thread, in context.</p>
<p>Can I put out a plea for someone, once the dust has settled, to
summarise the state of multi dispatch?</p>
<a name='Building support for non-native bytecode'></a><h2>Building support for non-native bytecode</h2>
<p>Dan mapped out what would be needed to implement a non-native VM. I
think he just wants to play Zork using parrot, but I'd never actually
say that. He also said he'd have the specs for dynamic opcode and PMC
loading out within 24 hours, but I think events may have intervened.</p>
<p><a href='http://archive.develooper.com/perl6-internals@perl.org/msg10806.html' target='_blank'>archive.develooper.com</a></p>
<a name='Mutable vs immutable strings'></a><h2>Mutable vs immutable strings</h2>
<p>Clark C Evans reckoned that we'd need both strings and buffers and
argued that all strings should start off as mutable, but that it
should be possible to 'freeze' them. He also pointed out that there
should be no corresponding 'thaw' operation. He wondered too if these
semantics might be useful for more than just strings. Florian
Haeglsperger wondered if Copy on Write didn't solve the problem at a
stroke, to which the answer appears to be 'Not Really'. Dan thinks
that readonliness should probably hang off PMCs rather than strings
and buffers. Dan also commented that we need to nail down some
semantics about when things can and can't be modified.</p>
<p>The discussion slowly morphed into a discussion of types in Perl and
other languages. Melvin Smith noted that &quot;we've built this register
based VM upon which Perl will probably be the most non-optimised
language. Things like exposing your lexical pads, eval, etc. blow
optimisation out of the water.&quot;, but reckoned that Perl itself would
probably still see a massive speedup.</p>
<p>Ashley Winters got scary. A paragraph that begins &quot;Whenever the
compiler runs across an eval, take a continuation from within the
compiler.&quot; is always going to be worrying. Actually, he proposed it as
a topic for a CS master's thesis, and Dan pointed out that one Damian
Conway is looking for students...</p>
<p>Quote of the thread: A tie between Ashley's paragraph opener above and
&quot;[Parrot] will have reflection, introspection, and Deep Meditative
Capabilities.&quot; -- Who else, Dan Sugalski</p>
<p><a href='http://archive.develooper.com/perl6-internals@perl.org/msg10807.html' target='_blank'>archive.develooper.com</a>
(re)start here.</p>
<a name='Adding the system stack to the rootset.'></a><h2>Adding the system stack to the rootset.</h2>
<p>One of the weird things about a system that can do continuations is
that stack frames need to come out of managed memory, you can't just
use the C stack. And if you *don't* manage stack frames using garbage
collection, then you end up with memory leaks 'cos the stack frames
don't get released. Which is where we stood.</p>
<p>Dan is in the process of making sure that system stack frames get
properly garbage collected. Mike Lambert also stepped up and did
some/most of the implementation.</p>
<p><a href='http://archive.develooper.com/perl6-internals@perl.org/msg10829.html' target='_blank'>archive.develooper.com</a></p>
<p><a href='http://archive.develooper.com/perl6-internals@perl.org/msg10881.html' target='_blank'>archive.develooper.com</a></p>
<p><a href='http://archive.develooper.com/perl6-internals@perl.org/msg10905.html' target='_blank'>archive.develooper.com</a>
Mike's patch.</p>
<a name='Making keyed aggregates really work.'></a><h2>Making keyed aggregates really work.</h2>
<p>Melvin Smith put out a call for someone to do an audit of the keyed
aggregate handling code and find out which methods are missing, which
ones aren't handled by the assembler and generally to fix them. Sean
(Her)O'Rourke has apparently done the deed.</p>
<a name='Parrot: copying arrays'></a><h2>Parrot: copying arrays</h2>
<p>Alberto Sim&amp;otilde;es wondered about copying and cloning of arrays
and other aggregates. How deeply should one go when making a copy as
opposed to just taking a reference? This one is still awaiting an
answer.</p>
<p><a href='http://archive.develooper.com/perl6-internals@perl.org/msg10868.html' target='_blank'>archive.develooper.com</a></p>
<a name='coders: add doco'></a><h2>coders: add doco</h2>
<p>The internals list came close to a flame war over this one. John Porter
opened with the somewhat incendiary &quot;I have to say that I am extremely
disappointed at the paucity of internal documentation.&quot; and went on to
make some good points, but in a tone that rather annoyed several
people.</p>
<p>Productive stuff that came out of this, and the subsequent 'Parrot
contribution' thread include:</p>
<ul>
<li><a name='FAQ writing should be a collaborative effort. The questions that an experienced Parrot head has, or thinks are important, are probably not the questions that a newbie would ask.'></a>FAQ writing should be a collaborative effort. The questions that an
experienced Parrot head has, or thinks are important, are probably not
the questions that a newbie would ask.</li>
<p>So, if you have a question that you think belongs in the FAQ, send a
message to the list with a subject line of 'PARROT QUESTION' and we'll
try and produce some sensible answers and add them to the FAQ.</p>
<li><a name='The Parrot IRC channel is a good place for some stuff but has no 'journal of record'. Something like London.pm's very lovely 'scribot' bot could prove really useful. (I'm deliberately not putting pointers to the IRC channel, if you need to know, read the thread.)'></a>The Parrot IRC channel is a good place for some stuff but has no
'journal of record'. Something like London.pm's very lovely 'scribot'
bot could prove really useful. (I'm deliberately not putting pointers
to the IRC channel, if you need to know, read the thread.)</li>
<li><a name='Why questions, and their answers are often really important.'></a>Why questions, and their answers are often really important.</li>
<li><a name='We really should be maintaining the .dev files associated with each source file, as mentioned in PDD7.'></a>We really should be maintaining the .dev files associated with each
source file, as mentioned in PDD7.</li>
<li><a name='Dan tries to be on IRC regularly from 1300-1700EST Wednesday. &quot;While it's no substitute for e-mail, and not as good a realtime communication method as face to face communication, it's better than no realtime communication at all.&quot;'></a>Dan tries to be on IRC regularly from 1300-1700EST Wednesday. &quot;While
it's no substitute for e-mail, and not as good a realtime
communication method as face to face communication, it's better than
no realtime communication at all.&quot;</li>
</ul>
<p>In the end, I think we ended up generating more light than heat, but
it was touch and go for a while...</p>
<p><a href='http://archive.develooper.com/perl6-internals@perl.org/msg10870.html' target='_blank'>archive.develooper.com</a></p>
<p><a href='http://archive.develooper.com/perl6-internals@perl.org/msg10882.html' target='_blank'>archive.develooper.com</a></p>
<a name='The first PARROT QUESTIONs'></a><h2>The first PARROT QUESTIONs</h2>
<p>Sadly, the first PARROT QUESTION post didn't contain any actual
questions. Ashley Winters pointed out that 'test_main.c' is a rather
weird place to find parrot's main loop and wondered why parrot.c is
empty.</p>
<p>His followup contained the actual questions, most of which got well
answered in the following thread, which is still ongoing.</p>
<p>Tom Hughes told us he was trying to make sense of the current status of
keyed access at all levels, from assembler through the ops to the
vtables and is getting more confused the more he looks. Which can't be
good. Melvin Smith agreed that things were confusing, but thought that
things might get a little less confusing when he'd committed Sean's
patches. Discussion is ongoing.</p>
<p><a href='http://archive.develooper.com/perl6-internals@perl.org/msg10926.html' target='_blank'>archive.develooper.com</a>
Ashley's background post.</p>
<p><a href='http://archive.develooper.com/perl6-internals@perl.org/msg10927.html' target='_blank'>archive.develooper.com</a>
Ashley's questions</p>
<p><a href='http://archive.develooper.com/perl6-internals@perl.org/msg10930.html' target='_blank'>archive.develooper.com</a>
Tom Hughes on keyed access</p>
<a name='More docs'></a><h2>More docs</h2>
<p>Stephen Rawls submitted rx.dev, an overview of the regular expression
code. Brent Dax added some clarification.</p>
<p>Alberto Sim&amp;otilde;es unveiled a pile of documentation for the Array,
PerlArray and PerlHash PMCs, earning himself a few Hero Points from
me.</p>
<a name='Type Morphing'></a><h2>Type Morphing</h2>
<p>I'm not entirely sure I understood this thread. Sean O'Rourke
submitted some patches to fix up Parrot's PMC type morphing. Mike
Lambert pointed at some ambiguities and then Sean showed some code
that seems rather counter intuitive to do with type morphing and
comparisons. He also provided a test file which shows some places
where Perl 5 and Parrot seem to disagree on semantics.</p>
<p><a href='http://archive.develooper.com/perl6-internals@perl.org/msg10940.html' target='_blank'>archive.develooper.com</a></p>
<a name='Glossary requests'></a><h2>Glossary requests</h2>
<p>Mike Litherland made some suggestions about what should go in the
Glossary. Patches were welcomed, and Dan added some terms to the
glossary, which is visible at <a href='http://www.parrotcode.org/glossary/' target='_blank'>www.parrotcode.org</a></p>
<a name='Meanwhile, in perl6-language'></a><h2>Meanwhile, in perl6-language</h2>
<p>The game of 'find a good description of continuations' rumbled on for
a bit. I liked Mike Lambert's description involving a traveller in a
maze (that's why Dan wants a Z-machine interpreter running on
Parrot. Continuations are the 'maze of little twisty passages all
similar').</p>
<p>Anyway, Dan also posted a splendidly clear and lucid explanation of
continuations. (Oh frabjous day! Calloo! Callay!) Peter Scott wondered
about serialising continuations, which is a tough problem because some
state really can't be serialised (filehandles for instance), which
lead Ted Zlatonov to suggest <code>FREEZE {...}</code> and <code>THAW {...}</code> blocks.</p>
<p><a href='http://archive.develooper.com/perl6-language@perl.org/msg10284.html' target='_blank'>archive.develooper.com</a>
Mike's 'maze' analogy.</p>
<p><a href='http://archive.develooper.com/perl6-language@perl.org/msg10275.html' target='_blank'>archive.develooper.com</a>
Dan's &quot;Continuations are just the stack, you know?&quot; version.</p>
<a name='What's MY.line'></a><h2>What's MY.line</h2>
<p>Chip Salzenburg asked some hardish questions about <code>MY</code>, <code>%MY</code> and
the difference between them. Piers (continuations everywhere) Cawley,
proposed <code>$a_continuation.the_pad</code>, which should probably be
<code>$a_continuation.MY</code> on further reflection, which Dan seemed to think
wasn't utterly insane.</p>
<p>It was also proposed that things like</p>
<pre>    [localhost:~] $ perl
    my $foo = 12;
    print $foo;
    my $foo = 'ho';
    print $foo;
    12ho[localhost:~] $</pre>
<p>which is legal (with -w a warning) in perl 5 should be illegal in perl
6. This was left as Larry's call.</p>
<p>Quote of the thread: 'And side effects like &quot;I call you, you modify
me invisibly....&quot; seems more like taking dangerous drugs than
programming.' -- Melvin Smith</p>
<p>On seeing the quote of the thread, Richard (madman) Clamp popped up to
point out that, with the aid of Devel::LexAlias you could already do
that in Perl 5. Which is nice.</p>
<p><a href='http://archive.develooper.com/perl6-language@perl.org/msg10290.html' target='_blank'>archive.develooper.com</a>
Thread starts here. Pretty much all worthwhile.</p>
<p><a href='http://archive.develooper.com/perl6-language@perl.org/msg10312.html' target='_blank'>archive.develooper.com</a>
Quote in context</p>
<p><a href='http://archive.develooper.com/perl6-language@perl.org/msg10319.html' target='_blank'>archive.develooper.com</a>
Richard Clamp's bombshell</p>
<a name='In brief'></a><h2>In brief</h2>
<p><a href='http://archive.develooper.com/perl6-internals@perl.org/msg10803.html' target='_blank'>archive.develooper.com</a>
-- Mark M. Adkins announced a perl script that hunts down all the POD
files in the Parrot directory tree and uses that to generate an HTML
tree in a new subdirectory. It looks rather handy.</p>
<p><a href='http://arstechnica.com/paedia/c/caching/caching-1.html' target='_blank'>arstechnica.com</a> -- Dan
pointed us at an explanation of CPU caches</p>
<p>Robert Spier pointed everyone at <a href='http://www.parrotcode.org' target='_blank'>www.parrotcode.org</a>, specifically
the <a href='http://www.parrotcode.org/resources/.' target='_blank'>www.parrotcode.org</a></p>
<p>Sean O'Rourke proposed ripping a bunch of <code>set_*</code> ops out of core.ops
now that we've got 'proper' keyed access in the assembler. Dan
concurred.</p>
<p><a href='http://archive.develooper.com/perl6-internals@perl.org/msg10920.html' target='_blank'>archive.develooper.com</a>
Tanton Gibbs sent a patch that adds documentation and a .dev file for
byteorder.c</p>
<p>Nicholas Clark is trying to eliminate compiler warnings.</p>
<p><a href='http://archive.develooper.com/perl6-internals@perl.org/msg10925.html' target='_blank'>archive.develooper.com</a>
Steve Purkis has a patch to add <code>usleep(int)</code> and <code>sleep(int)</code> to
the Linux version of Parrot. Dan likes the idea, but the patch won't
go in until it can be made to work on Win32 as well.</p>
<p><a href='http://archive.develooper.com/perl6-language@perl.org/msg10270.html' target='_blank'>archive.develooper.com</a>
Luke Palmer has a <a href='http://fibonaci.babylonia.flatirons.org/perl6.vim' target='_blank'>fibonaci.babylonia.flatirons.org</a> for Perl 6.</p>
<a name='The return of &quot;Who's Who in Perl 6&quot;'></a><h2>The return of &quot;Who's Who in Perl 6&quot;</h2>
<p>This week, Allison Randal answered the new standard &quot;5Ws questionnaire&quot;</p>
<ul>
<li><a name='Who are you?'></a>Who are you?</li>
<p>I'm on the IT staff at the University of Portland. In my spare time I
enjoy working on Perl 6. In my spare-spare time I like to swing in a
hammock and read and ponder the ineffability of 42.</p>
<li><a name='What do you do for/with Perl 6?'></a>What do you do for/with Perl 6?</li>
<p>I dream in Perl 6... ;)</p>
<p>On the Perl 6 design team I'm the other linguist, or Damian's clone, or
the assistant cat-herder, or sometimes the Devil's Advocate. It depends
on the day, really.</p>
<li><a name='Where are you coming from?'></a>Where are you coming from?</li>
<p>Perl 6 will be an incredible jump in power and flexibility. But it's
also a lot easier to use. I think that fact is often missed. People see a
flurry of changes, but they can't see the forest for the trees. It's not
just about making the hard things more possible, it's about making the
easy things easier. That's the message I want to carry.</p>
<li><a name='When do you think Perl 6 will be released?'></a>When do you think Perl 6 will be released?</li>
<p>February 17, 2004 at 13:42 GMT. ;) Okay, no. :) But the current
estimates of 12-18 months sound pretty reasonable, especially with the
progress we've seen in Parrot.</p>
<li><a name='Why are you doing this?'></a>Why are you doing this?</li>
<p>Life's too short to settle for weak coffee.</p>
<p>No, really, for the most selfish reason imaginable: I want to use Perl
6. Anything I can do to make it a better language or to help it reach
production faster is well worth the effort.</p>
<p>And it's incredibly fun.</p>
<li><a name='You have 5 words. Describe yourself.'></a>You have 5 words. Describe yourself.</li>
<p>Extreme Geekiness in Unusual Packaging.</p>
<li><a name='Do you have anything to declare?'></a>Do you have anything to declare?</li>
<p>Perl <code>rule</code>s!</p>
</ul>
<a name='Acknowledgements'></a><h2>Acknowledgements</h2>
<p>Thanks to the denizens of #perl and #parrot for their, ahem, 'mad
proofreading skeelz'. To Melvin Smith and Leon Brocard for their
explanations of imcc.</p>
<p>This summary was brought to you with the assistance of GNER tea, and
the music of Waterson:Carthy and Gillian Welch.</p>
<p>Once again, if you liked it, give money to
<a href='http://donate.yetanother.org/,' target='_blank'>donate.yetanother.org</a> if you didn't like it, well, you
can still give them money, maybe they'll use it to hire a better
writer. Or maybe you could write a competing summary.</p>
</div>
